package request;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;

/**
 * @author gongzhou
 * @title: PageRequestBody
 * @projectName SpringCloud
 * @description: TODO
 * @date 2019/3/2810:39
 */
@AllArgsConstructor
@Data
public class PageRequestBody implements Serializable {

    protected Integer page;
    protected Integer size;
    protected String keyword;
    protected Integer type;
    protected String sort;
    protected boolean isAsc;
    protected String fromDate;
    protected String toDate;

    public PageRequestBody() {

    }

    public PageRequestBody(Integer page, Integer size, String keyword) {
        this.page = page;
        this.size = size;
        this.keyword = keyword;
    }

    public PageRequestBody(Integer page, Integer size, String sort, boolean isAsc) {
        this.page = page;
        this.size = size;
        this.sort = sort;
        this.isAsc = isAsc;
    }

    public PageRequestBody(Integer page, Integer size, String keyword, String sort, boolean isAsc) {
        this.page = page;
        this.size = size;
        this.keyword = keyword;
        this.sort = sort;
        this.isAsc = isAsc;
    }

}
